<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <title>mui-player 使用 dash.js</title>
        <link rel="stylesheet" href="../release/mui-player/dist/mui-player.min.css">
        <script src="./static/js/config.js"></script>
        <script src="../release/mui-player/dist/mui-player.min.js"></script>
        <script src="./plugin/dash.all.min.js"></script>
    </head>
    
	<body>
        <h3 style="text-align: center;">DASH</h3>
        <div id="mui-player" style="max-width: 700px;margin: auto"></div>
    </body>
    
    <script>
        var config = window.playerConfig;
        config.src = 'https://dash.akamaized.net/envivio/EnvivioDash3/manifest.mpd';
        config.parse = {
            customKernel:function(video,src) {
                let dashMedia = dashjs.MediaPlayer().create();
                dashMedia.initialize(video, src,false);
                dashMedia.on(dashjs.MediaPlayer.events.ERROR,function(errMes) {
                    console.error(errMes);
                    // 发送错误报告
                    mp.sendError(errMes);

                    dashMedia.reset();
                })
            }
        }
        
        console.log(config);
        var mp = new MuiPlayer(config);
    </script>
</html>